<!DOCTYPE html>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>highlight.tcsh</title>
<meta name="generator" content="KF5::SyntaxHighlighting - Definition (Tcsh) - Theme (Breeze Dark)"/>
</head><body style="background-color:#232629;color:#cfcfc2"><pre>
<span style="color:#7a7c7d;">#!/bin/tcsh -f</span>

<span style="font-weight:bold;">[</span> a <span style="color:#27ae60;">!=</span> b<span style="font-weight:bold;"> ]</span> <span style="font-weight:bold;">&amp;&amp;</span> <span style="font-weight:bold;">echo</span> a <span style="font-weight:bold;">||</span> <span style="font-weight:bold;">echo</span> b
<span style="color:#7a7c7d;"># + not an operator</span>
<span style="font-weight:bold;">[</span> 1+2 <span style="color:#27ae60;">==</span> <span style="color:#f44f4f;">'1+2'</span><span style="font-weight:bold;"> ]</span> <span style="font-weight:bold;">&amp;&amp;</span> <span style="font-weight:bold;">echo</span> a <span style="font-weight:bold;">||</span> <span style="font-weight:bold;">echo</span> b
<span style="font-weight:bold;">[</span> 1 <span style="color:#27ae60;">!=</span> <span style="color:#f44f4f;">'1+2'</span><span style="font-weight:bold;"> ]</span> <span style="font-weight:bold;">&amp;&amp;</span> <span style="font-weight:bold;">echo</span> a <span style="font-weight:bold;">||</span> <span style="font-weight:bold;">echo</span> b
<span style="font-weight:bold;">[</span> a <span style="color:#27ae60;">=~</span> b<span style="font-weight:bold;"> ]</span> <span style="font-weight:bold;">&amp;&amp;</span> <span style="font-weight:bold;">echo</span> a <span style="font-weight:bold;">||</span> <span style="font-weight:bold;">echo</span> b
<span style="font-weight:bold;">[</span> a <span style="color:#27ae60;">!~</span> b<span style="font-weight:bold;"> ]</span> <span style="font-weight:bold;">&amp;&amp;</span> <span style="font-weight:bold;">echo</span> a <span style="font-weight:bold;">||</span> <span style="font-weight:bold;">echo</span> b

<span style="font-weight:bold;">set</span> a = 1
<span style="font-weight:bold;">set</span> b = 2

<span style="color:#7a7c7d;"># arithmetic operators</span>
<span style="color:#fdbc4b;font-weight:bold;">if</span> <span style="font-weight:bold;">(</span><span style="color:#27ae60;">$a</span> <span style="color:#27ae60;">&lt;</span> <span style="color:#27ae60;">$b</span><span style="font-weight:bold;">)</span> <span style="font-weight:bold;">echo</span> 1
<span style="color:#fdbc4b;font-weight:bold;">if</span> <span style="font-weight:bold;">(</span><span style="color:#27ae60;">$a</span> <span style="color:#27ae60;">&lt;&lt;</span> <span style="color:#27ae60;">$b</span><span style="font-weight:bold;">)</span> <span style="font-weight:bold;">echo</span> 1
<span style="color:#fdbc4b;font-weight:bold;">if</span> <span style="font-weight:bold;">(</span><span style="color:#27ae60;">$a</span> <span style="color:#27ae60;">&gt;</span> <span style="color:#27ae60;">$b</span> <span style="color:#27ae60;">-</span> 2<span style="font-weight:bold;">)</span> <span style="font-weight:bold;">echo</span> 1
<span style="color:#fdbc4b;font-weight:bold;">if</span> <span style="font-weight:bold;">(</span><span style="color:#27ae60;">$a</span> <span style="color:#27ae60;">+</span> 11 <span style="color:#27ae60;">&gt;&gt;</span> <span style="color:#27ae60;">$b</span><span style="font-weight:bold;">)</span> <span style="font-weight:bold;">echo</span> 1
<span style="color:#fdbc4b;font-weight:bold;">if</span> <span style="font-weight:bold;">(</span><span style="color:#27ae60;">$a</span> <span style="color:#27ae60;">&lt;=</span> <span style="color:#27ae60;">$b</span><span style="font-weight:bold;">)</span> <span style="font-weight:bold;">echo</span> 1
<span style="color:#fdbc4b;font-weight:bold;">if</span> <span style="font-weight:bold;">(</span><span style="color:#27ae60;">$a</span> <span style="color:#27ae60;">+</span> 1 <span style="color:#27ae60;">&gt;=</span> <span style="color:#27ae60;">$b</span><span style="font-weight:bold;">)</span> <span style="font-weight:bold;">echo</span> 1
<span style="color:#fdbc4b;font-weight:bold;">if</span> <span style="font-weight:bold;">(</span><span style="color:#27ae60;">$a</span> <span style="color:#27ae60;">/</span> <span style="color:#27ae60;">$b</span> <span style="color:#27ae60;">+</span> 1<span style="font-weight:bold;">)</span> <span style="font-weight:bold;">echo</span> 1
<span style="color:#fdbc4b;font-weight:bold;">if</span> <span style="font-weight:bold;">(</span><span style="color:#27ae60;">$a</span> <span style="color:#27ae60;">%</span> <span style="color:#27ae60;">$b</span><span style="font-weight:bold;">)</span> <span style="font-weight:bold;">echo</span> 1
<span style="color:#fdbc4b;font-weight:bold;">if</span> <span style="font-weight:bold;">(</span><span style="color:#27ae60;">$a</span> <span style="color:#27ae60;">*</span> <span style="color:#27ae60;">$b</span><span style="font-weight:bold;">)</span> <span style="font-weight:bold;">echo</span> 1

<span style="color:#7a7c7d;"># string operators</span>
<span style="color:#fdbc4b;font-weight:bold;">if</span> <span style="font-weight:bold;">(</span><span style="color:#27ae60;">$a</span> <span style="color:#27ae60;">==</span> <span style="color:#27ae60;">$b</span><span style="font-weight:bold;">)</span> <span style="font-weight:bold;">echo</span> s
<span style="color:#fdbc4b;font-weight:bold;">if</span> <span style="font-weight:bold;">(</span><span style="color:#27ae60;">$a</span> <span style="color:#27ae60;">!=</span> <span style="color:#27ae60;">$b</span><span style="font-weight:bold;">)</span> <span style="font-weight:bold;">echo</span> s
<span style="color:#fdbc4b;font-weight:bold;">if</span> <span style="font-weight:bold;">(</span><span style="color:#27ae60;">$a</span> <span style="color:#27ae60;">=~</span> <span style="color:#27ae60;">$b</span><span style="font-weight:bold;">)</span> <span style="font-weight:bold;">echo</span> s
<span style="color:#fdbc4b;font-weight:bold;">if</span> <span style="font-weight:bold;">(</span><span style="color:#27ae60;">$a</span> <span style="color:#27ae60;">!~</span> <span style="color:#27ae60;">$b</span><span style="font-weight:bold;">)</span> <span style="font-weight:bold;">echo</span> s

<span style="font-weight:bold;">set</span> val = 0

<span style="color:#fdbc4b;font-weight:bold;">foreach</span> scen <span style="font-weight:bold;">(</span> a b <span style="font-weight:bold;">)</span>
  <span style="font-weight:bold;">echo</span> <span style="color:#27ae60;">$scen</span>

  <span style="color:#fdbc4b;font-weight:bold;">if</span> <span style="font-weight:bold;">(</span><span style="color:#27ae60;">$scen</span> <span style="color:#27ae60;">==</span> a<span style="font-weight:bold;">)</span> <span style="color:#fdbc4b;font-weight:bold;">then</span>
    <span style="font-weight:bold;">echo</span> <span style="color:#27ae60;">$scen</span>
  <span style="color:#fdbc4b;font-weight:bold;">else if</span> <span style="font-weight:bold;">(</span><span style="color:#27ae60;">$scen</span> <span style="color:#27ae60;">==</span> x<span style="font-weight:bold;">)</span> <span style="color:#fdbc4b;font-weight:bold;">then</span>
    <span style="font-weight:bold;">echo</span> x
  <span style="color:#fdbc4b;font-weight:bold;">else</span>
    <span style="font-weight:bold;">echo</span> <span style="color:#27ae60;">$val</span>
  <span style="color:#fdbc4b;font-weight:bold;">endif</span>
<span style="color:#fdbc4b;font-weight:bold;">end</span>
</pre></body></html>
